From: Jasper St. Pierre Date: Thu, 26 Sep 2013 19:16:45 +0000 (-0400) Subject: searchDisplay: Scroll results when the user focuses a provider icon X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~3325 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=2d80cb71db9f1335b46e2134df99c16d5cadc507;p=gnome-shell.git searchDisplay: Scroll results when the user focuses a provider icon Otherwise, it seems odd to highlight results the user can't see simply by pressing down a lot. https://bugzilla.gnome.org/show_bug.cgi?id=708868 --- diff --git a/js/ui/searchDisplay.js b/js/ui/searchDisplay.js index 72aa13194..69c79a1af 100644 --- a/js/ui/searchDisplay.js +++ b/js/ui/searchDisplay.js @@ -214,8 +214,8 @@ const SearchResultsBase = new Lang.Class({ this.actor.hide(); }, - _keyFocusIn: function(icon) { - this.emit('key-focus-in', icon); + _keyFocusIn: function(actor) { + this.emit('key-focus-in', actor); }, _setMoreIconVisible: function(visible) { @@ -259,6 +259,7 @@ const ListSearchResults = new Lang.Class({ this._container = new St.BoxLayout({ style_class: 'search-section-content' }); this.providerIcon = new ProviderIcon(provider); + this.providerIcon.connect('key-focus-in', Lang.bind(this, this._keyFocusIn)); this.providerIcon.connect('clicked', Lang.bind(this, function() { provider.launchSearch(this._terms); @@ -404,8 +405,8 @@ const SearchResults = new Lang.Class({ return false; }, - _keyFocusIn: function(provider, icon) { - Util.ensureActorVisibleInScrollView(this._scrollView, icon); + _keyFocusIn: function(provider, actor) { + Util.ensureActorVisibleInScrollView(this._scrollView, actor); }, createProviderDisplay: function(provider) {